<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>编辑文章</title>
		<script charset="utf-8" src="editor/kindeditor.js"></script>
		<script>        
			KE.show(
				{
					id : 'article_content',
					resizeMode : 1,
					items : [
								'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold', 'italic', 'underline',
								'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
								'insertunorderedlist', '|', 'emoticons', 'link']
				}
			);
		</script>
	</head>
	<body>
		<h1>
			编辑${category.name}
		</h1>
		<div class="div_article">
			<s:form action="manage/editArticle.action" method="POST" theme="simple" enctype="multipart/form-data">
				<input type="hidden" name="cid" value="${article.cid}"/>
				<input type="hidden" name="article.cid" value="${article.cid}"/>
				<input type="hidden" name="article.id" value="${article.id}"/>
				<table>
					<tbody>
						<tr>
							<th>
								标题：
							</th>
							<td>
								<s:textfield name="article.title" cssClass="input_long"></s:textfield>
							</td>
						</tr>
						<s:if test="article.cid==2">
						<tr>
							<th>
								图片：
							</th>
							<td>
								<s:file name="articleImage" cssClass="input_long"></s:file>
							</td>
						</tr>
						</s:if>
						<tr>
							<th>
								附件：
							</th>
							<td>
								<s:file name="articleFile" cssClass="input_long"></s:file>
							</td>
						</tr>
						<tr>
							<th>
								内容：
							</th>
							<td>
								<s:textarea id="article_content" name="article.content" cols="80" rows="30"></s:textarea>	
							</td>
						</tr>
						<tr>
							<td>
							</td>
							<td>
								<s:submit value="提    交"></s:submit>
							</td>
						</tr>
					</tbody>
				</table>
			</s:form>
		</div>
	</body>
</html>